Skip to content

chore: Update generate-method-action-types script to be used in a single package#7983

Merged
GuillaumeRx merged 6 commits intomainfrom
gr/single-package-generate-action-types
Feb 19, 2026
Merged

chore: Update generate-method-action-types script to be used in a single package#7983
GuillaumeRx merged 6 commits intomainfrom
gr/single-package-generate-action-types

Conversation

@GuillaumeRx
Copy link
Contributor

@GuillaumeRx GuillaumeRx commented Feb 18, 2026

Explanation

This updates the generate-method-action-types to be used in a single package context rather than at the root of the monorepo.

It also adds a positional arg that represents the path of the controller folder. It allows to define a path when the controller is not in the expected src/ folder.

Screenshot 2026-02-18 at 18 15 28

(It's expected that it doesn't find any definition for profile-sync-controller)

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Build/lint tooling changes only, primarily affecting how codegen is invoked and where it searches for controllers; low chance of runtime impact but could break CI if a package lacks the new script/dependency.

Overview
Updates yarn generate-method-action-types to run per workspace (via workspaces foreach) instead of directly executing the root script.

Adds a generate-method-action-types script (and tsx devDependency) to multiple packages, and updates scripts/generate-method-action-types.ts to accept an optional positional [path] and scan that directory (default src) rather than iterating packages/*/src from the monorepo root.

Written by Cursor Bugbot for commit d1af65e. This will update automatically on new commits. Configure here.

@GuillaumeRx GuillaumeRx force-pushed the gr/single-package-generate-action-types branch from d1723db to 3de1c1e Compare February 18, 2026 18:30
@GuillaumeRx GuillaumeRx marked this pull request as ready for review February 18, 2026 18:30
@GuillaumeRx GuillaumeRx requested review from a team as code owners February 18, 2026 18:30
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes looks good to me! just one more suggestion can we add this to all packages and add a constraints too here https://github.com/MetaMask/core/blob/main/yarn.config.cjs#L41 ?

@GuillaumeRx
Copy link
Contributor Author

GuillaumeRx commented Feb 18, 2026

The changes looks good to me! just one more suggestion can we add this to all packages and add a constraints too here https://github.com/MetaMask/core/blob/main/yarn.config.cjs#L41 ?

That sounds like something we could do once we migrated all the packages ? It's my main task right now to make all the controllers use MESSENGER_EXPOSED_METHODS. I'm not sure it makes sense right now as the script would run just to end up not finding what it needs.

cryptodev-2s
cryptodev-2s previously approved these changes Feb 18, 2026
@GuillaumeRx GuillaumeRx force-pushed the gr/single-package-generate-action-types branch from cf5798c to d1af65e Compare February 19, 2026 10:34
@GuillaumeRx GuillaumeRx added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit abe382c Feb 19, 2026
310 checks passed
@GuillaumeRx GuillaumeRx deleted the gr/single-package-generate-action-types branch February 19, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants